package jpa.entitys.promis.common;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the PERMANENT_RECEIPTS database table.
 * 
 */
@Entity
@Table(name="PERMANENT_RECEIPTS")
@NamedQueries({
    @NamedQuery(name = "PermanentReceipt.findAll", query = " SELECT c FROM PermanentReceipt c "),
    @NamedQuery(name = "PermanentReceipt.findById", query = " SELECT c FROM PermanentReceipt c WHERE c.id = :Id "),
    @NamedQuery(name = "PermanentReceipt.findByStatus", query = " SELECT c FROM PermanentReceipt c WHERE c.syncIssync = 'N' And c.status = :status"),
    @NamedQuery(name = "PermanentReceipt.findBySapReceiptedNo", query = " SELECT c FROM PermanentReceipt c WHERE c.syncExternalRefNo =:syncExternalRefNo And c.syncIssync = 'N' And c.status = :status"),
    @NamedQuery(name = "PermanentReceipt.findBySapReceiptedNoWithoutSyag", query = " SELECT c FROM PermanentReceipt c WHERE c.syncExternalRefNo =:syncExternalRefNo And c.status = :status")
})
public class PermanentReceipt extends jpa.entitys.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private PermanentReceiptPK id;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	@Column(name="ADDRESS_CODE")
	private BigDecimal addressCode;

	@Column(name="ADDRESS_CUSTOMER")
	private String addressCustomer;

	private BigDecimal amount;

	@Column(name="BOOKING_NUMBER")
	private BigDecimal bookingNumber;

	@Column(name="BOOKING_SERIES")
	private String bookingSeries;

	@Column(name="BUILDING_PHASE_CODE")
	private String buildingPhaseCode;

	@Column(name="CONTRACT_NUMBER")
	private BigDecimal contractNumber;

	@Column(name="CONTRACT_SERIES")
	private String contractSeries;

	@Column(name="CREATED_BY")
	private String createdBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	private String currency;

	@Column(name="CUSTOMER_ADDRESS_CODE")
	private String customerAddressCode;

	@Column(name="CUSTOMER_CODE")
	private String customerCode;

	@Column(name="CUSTOMER_NAME")
	private String customerName;

	@Column(name="CUSTOMER_NAME_ENG")
	private String customerNameEng;

	@Column(name="DEPARTMENT_CODE")
	private String departmentCode;

	private BigDecimal discount;

	@Column(name="EXCHANGE_RATE")
	private BigDecimal exchangeRate;

	@Column(name="FLOOR_ZONE_CODE")
	private String floorZoneCode;

	private BigDecimal interest;

	@Column(name="INTEREST_RECEIVED")
	private BigDecimal interestReceived;

	@Column(name="\"LANGUAGE\"")
	private String language;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="LOT_CODE")
	private String lotCode;

	@Column(name="LOT_DESC")
	private String lotDesc;

	@Column(name="MP_NO")
	private BigDecimal mpNo;

	@Column(name="MP_SERIES")
	private String mpSeries;

	@Column(name="MP_TYPE")
	private String mpType;

	private String narration;

	@Column(name="NET_AMOUNT_RECEIVED")
	private BigDecimal netAmountReceived;

	@Column(name="PAYMENT_REF_NUMBER")
	private BigDecimal paymentRefNumber;

	@Column(name="PAYMENT_REF_SERIES")
	private String paymentRefSeries;

	@Column(name="PAYMENT_REF_TYPE")
	private String paymentRefType;

	@Column(name="PERMANENT_RECEIPTS_ID")
	private String permanentReceiptsId;

	@Column(name="PRINT_COUNT")
	private BigDecimal printCount;

	private BigDecimal printed;

	@Column(name="PROJECT_REF")
	private String projectRef;

	@Column(name="PROPERTY_TYPE_CODE")
	private String propertyTypeCode;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="RECEIPT_DATE")
	private Date receiptDate;

	@Column(name="RECEIVED_FROM")
	private String receivedFrom;

	@Column(name="REF_DOCUMENT")
	private String refDocument;

	private String remarks;

	@Column(name="REVISION_NUMBER")
	private BigDecimal revisionNumber;

	@Column(name="RP_AMOUNT")
	private BigDecimal rpAmount;

	@Column(name="SEQ_NO")
	private BigDecimal seqNo;

	private String status;

	@Column(name="SYNC_CREATEDBY")
	private String syncCreatedby;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY")
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO")
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSTAGING")
	private String syncIsstaging;

	@Column(name="SYNC_ISSYNC")
	private String syncIssync;

	@Column(name="SYNC_RECEIPTED_PK_ID")
	private String syncReceiptedPkId;

	@Column(name="SYNC_UPDATEDBY")
	private String syncUpdatedby;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="TOTAL_CHARGE_AMOUNT")
	private BigDecimal totalChargeAmount;

	@Column(name="TOTAL_PAID_AMOUNT")
	private BigDecimal totalPaidAmount;

	@Column(name="TOTAL_REFUND")
	private BigDecimal totalRefund;

	@Column(name="TOTAL_UNIT_AMOUNT")
	private BigDecimal totalUnitAmount;

	@Column(name="TRANSACTION_CODE")
	private String transactionCode;

	@Column(name="TYPE_OF_BOOKING")
	private String typeOfBooking;

	@Column(name="TYPE_OF_CONTRACT")
	private String typeOfContract;

	@Column(name="UID_PERMANENT_RECEIPTS")
	private BigDecimal uidPermanentReceipts;

	@Column(name="UNIT_NUMBER")
	private String unitNumber;

	@Column(name="VAT_AMOUNT")
	private BigDecimal vatAmount;

	@Column(name="VOUCHER_NUMBER")
	private BigDecimal voucherNumber;

	@Column(name="VOUCHER_SERIES")
	private String voucherSeries;

	@Column(name="VOUCHER_TYPE")
	private String voucherType;

	@Column(name="WHT_AMOUNT")
	private BigDecimal whtAmount;
	
	@Column(name="IS_INTERFACE")
	private String isInterface;
	
	@Column(name="CHEQUE_PDC_REF")
	private String chequePdcRef;

	public String getIsInterface() {
		return isInterface;
	}

	public void setIsInterface(String isInterface) {
		this.isInterface = isInterface;
	}

	public PermanentReceipt() {
	}
	
	/**
	 * @return the chequePdcRef
	 */
	public String getChequePdcRef() {
		return chequePdcRef;
	}

	/**
	 * @param chequePdcRef the chequePdcRef to set
	 */
	public void setChequePdcRef(String chequePdcRef) {
		this.chequePdcRef = chequePdcRef;
	}

	public PermanentReceiptPK getId() {
		return this.id;
	}

	public void setId(PermanentReceiptPK id) {
		this.id = id;
	}

	public BigDecimal getAddressCode() {
		return this.addressCode;
	}

	public void setAddressCode(BigDecimal addressCode) {
		this.addressCode = addressCode;
	}

	public String getAddressCustomer() {
		return this.addressCustomer;
	}

	public void setAddressCustomer(String addressCustomer) {
		this.addressCustomer = addressCustomer;
	}

	public BigDecimal getAmount() {
		return this.amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public BigDecimal getBookingNumber() {
		return this.bookingNumber;
	}

	public void setBookingNumber(BigDecimal bookingNumber) {
		this.bookingNumber = bookingNumber;
	}

	public String getBookingSeries() {
		return this.bookingSeries;
	}

	public void setBookingSeries(String bookingSeries) {
		this.bookingSeries = bookingSeries;
	}

	public String getBuildingPhaseCode() {
		return this.buildingPhaseCode;
	}

	public void setBuildingPhaseCode(String buildingPhaseCode) {
		this.buildingPhaseCode = buildingPhaseCode;
	}

	public BigDecimal getContractNumber() {
		return this.contractNumber;
	}

	public void setContractNumber(BigDecimal contractNumber) {
		this.contractNumber = contractNumber;
	}

	public String getContractSeries() {
		return this.contractSeries;
	}

	public void setContractSeries(String contractSeries) {
		this.contractSeries = contractSeries;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getCustomerAddressCode() {
		return this.customerAddressCode;
	}

	public void setCustomerAddressCode(String customerAddressCode) {
		this.customerAddressCode = customerAddressCode;
	}

	public String getCustomerCode() {
		return this.customerCode;
	}

	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}

	public String getCustomerName() {
		return this.customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getCustomerNameEng() {
		return this.customerNameEng;
	}

	public void setCustomerNameEng(String customerNameEng) {
		this.customerNameEng = customerNameEng;
	}

	public String getDepartmentCode() {
		return this.departmentCode;
	}

	public void setDepartmentCode(String departmentCode) {
		this.departmentCode = departmentCode;
	}

	public BigDecimal getDiscount() {
		return this.discount;
	}

	public void setDiscount(BigDecimal discount) {
		this.discount = discount;
	}

	public BigDecimal getExchangeRate() {
		return this.exchangeRate;
	}

	public void setExchangeRate(BigDecimal exchangeRate) {
		this.exchangeRate = exchangeRate;
	}

	public String getFloorZoneCode() {
		return this.floorZoneCode;
	}

	public void setFloorZoneCode(String floorZoneCode) {
		this.floorZoneCode = floorZoneCode;
	}

	public BigDecimal getInterest() {
		return this.interest;
	}

	public void setInterest(BigDecimal interest) {
		this.interest = interest;
	}

	public BigDecimal getInterestReceived() {
		return this.interestReceived;
	}

	public void setInterestReceived(BigDecimal interestReceived) {
		this.interestReceived = interestReceived;
	}

	public String getLanguage() {
		return this.language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public String getLotCode() {
		return this.lotCode;
	}

	public void setLotCode(String lotCode) {
		this.lotCode = lotCode;
	}

	public String getLotDesc() {
		return this.lotDesc;
	}

	public void setLotDesc(String lotDesc) {
		this.lotDesc = lotDesc;
	}

	public BigDecimal getMpNo() {
		return this.mpNo;
	}

	public void setMpNo(BigDecimal mpNo) {
		this.mpNo = mpNo;
	}

	public String getMpSeries() {
		return this.mpSeries;
	}

	public void setMpSeries(String mpSeries) {
		this.mpSeries = mpSeries;
	}

	public String getMpType() {
		return this.mpType;
	}

	public void setMpType(String mpType) {
		this.mpType = mpType;
	}

	public String getNarration() {
		return this.narration;
	}

	public void setNarration(String narration) {
		this.narration = narration;
	}

	public BigDecimal getNetAmountReceived() {
		return this.netAmountReceived;
	}

	public void setNetAmountReceived(BigDecimal netAmountReceived) {
		this.netAmountReceived = netAmountReceived;
	}

	public BigDecimal getPaymentRefNumber() {
		return this.paymentRefNumber;
	}

	public void setPaymentRefNumber(BigDecimal paymentRefNumber) {
		this.paymentRefNumber = paymentRefNumber;
	}

	public String getPaymentRefSeries() {
		return this.paymentRefSeries;
	}

	public void setPaymentRefSeries(String paymentRefSeries) {
		this.paymentRefSeries = paymentRefSeries;
	}

	public String getPaymentRefType() {
		return this.paymentRefType;
	}

	public void setPaymentRefType(String paymentRefType) {
		this.paymentRefType = paymentRefType;
	}

	public String getPermanentReceiptsId() {
		return this.permanentReceiptsId;
	}

	public void setPermanentReceiptsId(String permanentReceiptsId) {
		this.permanentReceiptsId = permanentReceiptsId;
	}

	public BigDecimal getPrintCount() {
		return this.printCount;
	}

	public void setPrintCount(BigDecimal printCount) {
		this.printCount = printCount;
	}

	public BigDecimal getPrinted() {
		return this.printed;
	}

	public void setPrinted(BigDecimal printed) {
		this.printed = printed;
	}

	public String getProjectRef() {
		return this.projectRef;
	}

	public void setProjectRef(String projectRef) {
		this.projectRef = projectRef;
	}

	public String getPropertyTypeCode() {
		return this.propertyTypeCode;
	}

	public void setPropertyTypeCode(String propertyTypeCode) {
		this.propertyTypeCode = propertyTypeCode;
	}

	public Date getReceiptDate() {
		return this.receiptDate;
	}

	public void setReceiptDate(Date receiptDate) {
		this.receiptDate = receiptDate;
	}

	public String getReceivedFrom() {
		return this.receivedFrom;
	}

	public void setReceivedFrom(String receivedFrom) {
		this.receivedFrom = receivedFrom;
	}

	public String getRefDocument() {
		return this.refDocument;
	}

	public void setRefDocument(String refDocument) {
		this.refDocument = refDocument;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public BigDecimal getRevisionNumber() {
		return this.revisionNumber;
	}

	public void setRevisionNumber(BigDecimal revisionNumber) {
		this.revisionNumber = revisionNumber;
	}

	public BigDecimal getRpAmount() {
		return this.rpAmount;
	}

	public void setRpAmount(BigDecimal rpAmount) {
		this.rpAmount = rpAmount;
	}

	public BigDecimal getSeqNo() {
		return this.seqNo;
	}

	public void setSeqNo(BigDecimal seqNo) {
		this.seqNo = seqNo;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncReceiptedPkId() {
		return this.syncReceiptedPkId;
	}

	public void setSyncReceiptedPkId(String syncReceiptedPkId) {
		this.syncReceiptedPkId = syncReceiptedPkId;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public BigDecimal getTotalChargeAmount() {
		return this.totalChargeAmount;
	}

	public void setTotalChargeAmount(BigDecimal totalChargeAmount) {
		this.totalChargeAmount = totalChargeAmount;
	}

	public BigDecimal getTotalPaidAmount() {
		return this.totalPaidAmount;
	}

	public void setTotalPaidAmount(BigDecimal totalPaidAmount) {
		this.totalPaidAmount = totalPaidAmount;
	}

	public BigDecimal getTotalRefund() {
		return this.totalRefund;
	}

	public void setTotalRefund(BigDecimal totalRefund) {
		this.totalRefund = totalRefund;
	}

	public BigDecimal getTotalUnitAmount() {
		return this.totalUnitAmount;
	}

	public void setTotalUnitAmount(BigDecimal totalUnitAmount) {
		this.totalUnitAmount = totalUnitAmount;
	}

	public String getTransactionCode() {
		return this.transactionCode;
	}

	public void setTransactionCode(String transactionCode) {
		this.transactionCode = transactionCode;
	}

	public String getTypeOfBooking() {
		return this.typeOfBooking;
	}

	public void setTypeOfBooking(String typeOfBooking) {
		this.typeOfBooking = typeOfBooking;
	}

	public String getTypeOfContract() {
		return this.typeOfContract;
	}

	public void setTypeOfContract(String typeOfContract) {
		this.typeOfContract = typeOfContract;
	}

	public BigDecimal getUidPermanentReceipts() {
		return this.uidPermanentReceipts;
	}

	public void setUidPermanentReceipts(BigDecimal uidPermanentReceipts) {
		this.uidPermanentReceipts = uidPermanentReceipts;
	}

	public String getUnitNumber() {
		return this.unitNumber;
	}

	public void setUnitNumber(String unitNumber) {
		this.unitNumber = unitNumber;
	}

	public BigDecimal getVatAmount() {
		return this.vatAmount;
	}

	public void setVatAmount(BigDecimal vatAmount) {
		this.vatAmount = vatAmount;
	}

	public BigDecimal getVoucherNumber() {
		return this.voucherNumber;
	}

	public void setVoucherNumber(BigDecimal voucherNumber) {
		this.voucherNumber = voucherNumber;
	}

	public String getVoucherSeries() {
		return this.voucherSeries;
	}

	public void setVoucherSeries(String voucherSeries) {
		this.voucherSeries = voucherSeries;
	}

	public String getVoucherType() {
		return this.voucherType;
	}

	public void setVoucherType(String voucherType) {
		this.voucherType = voucherType;
	}

	public BigDecimal getWhtAmount() {
		return this.whtAmount;
	}

	public void setWhtAmount(BigDecimal whtAmount) {
		this.whtAmount = whtAmount;
	}

}